<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>检测算法</title>
    <style>
        #body{

            font-size:12px;

            background-image:url(/static/assets/img/blog-section-left-bg.png);

            background-repeat:repeat-x;
            background-size: 100% 100%;

            width: 100%;
            height: 100%;
            COLOR: #0C2B30;

        }
        #myEcharts {
            width: 700px;
            height: 600px;
            border: solid 1px red;
            margin: 0 auto;}
        #content{
            width: 200px;
            height: 100px;
        }
        .a-upload {
            padding: 4px 10px;
            height: 30px;
            line-height: 20px;
            position: relative;
            cursor: pointer;
            color: #888;
            background: #fafafa;
            border: 1px solid #ddd;
            border-radius: 4px;
            overflow: hidden;
            display: inline-block;
            *display: inline;
            *zoom: 1
        }
        .a-upload  input {
            position: absolute;
            font-size: 100px;
            right: 0;
            top: 0;
            opacity: 0;
            filter: alpha(opacity=0);
            cursor: pointer
        }
        .a-upload:hover {
            color: #444;
            background: #eee;
            border-color: #ccc;
            text-decoration: none

        }
    </style>
    <link rel="stylesheet" href="/static/css/base.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/sentiment.css"/>
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=OF5fGEzn9dxVFvnarSdWqdu5UpltidFx"></script>
    <script type="text/javascript" src="/static/js/echarts.min.js"></script>
    <script src="/static/js/vue.min.js"></script>
    <script src="/static/js/jquery.js"></script>
    <script src="/static/js/bmap.js"></script>
    <script src="/static/assets/js/jquery-3.5.1.min.js"></script>
    <!--  Bootstrap JS  -->
    <script src="https://cdn.bootcss.com/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="/static/assets/js/bootstrap.js"></script>
    <!--  Easing JS  -->
    <script src="/static/assets/js/jquery.easing.min.js"></script>
    <!--  Typed JS  -->
    <script src="/static/assets/js/typed.js"></script>
    <!--  Wow JS  -->
    <script src="/static/assets/js/wow.min.js"></script>
    <!--  CountTo JS  -->
    <script src="/static/assets/js/jquery.countTo.js"></script>
    <!--  Isotope JS  -->
    <script src="/static/assets/js/isotope.pkgd.min.js"></script>
    <!--  Magnific Popup JS  -->
    <script src="/static/assets/js/jquery.magnific-popup.min.js"></script>
    <!--  Owl Carousel JS  -->
    <script src="/static/assets/js/owl.carousel.min.js"></script>
    <!--  Custom JS  -->
    <script src="/static/assets/js/roiton.js"></script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="Roiton"/>
    <meta name="keywords" content="Responsive, HTML5 template, Retrina Group, Multi Page, Landing, Startup, Business, Company, Corporate, Creative, Freelancers">
    <meta name="author" content="Retrina Group" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

    <!-- SITE TITLE -->
    <title>检测算法</title>

    <!--  FavIcon  -->
    <link rel="shortcut icon" href="/static/assets/img/favicon.ico">

    <!-- GOOGLE FONTS -->
    <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;600;700;800;900&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="/static/css/base.css" />
    <link href="/static/css/history.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/static/css/measure.css"/>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="/static/assets/css/bootstrap.css">
    <!-- Animated  CSS  -->
    <link rel="stylesheet" href="/static/assets/css/animated.css">
    <!-- LineIcon Css -->
    <link rel="stylesheet" href="/static/assets/css/LineIcons.css">
    <!--  Magnific Popup CSS  -->
    <link rel="stylesheet" href="/static/assets/css/magnific-popup.css">
    <!--  Owl Carousel CSS  -->
    <link rel="stylesheet" href="/static/assets/css/owl.carousel.min.css">
    <!-- Style CSS -->
    <link rel="stylesheet" href="/static/assets/css/style.css">
</head>
<body data-spy="scroll" data-target="#scrollspy" data-offset="61">


<!-- PRELOADER
============================================= -->
<div id="loader-wrapper">
    <div id="loader">
        <div class="cssload-spin-box"></div>
    </div>
</div>

<!-- PAGE CONTENT
============================================= -->
<div id="page-content" class="page-content demo-01">

    <!-- HEADER
    ============================================= -->
    <header id="header" class="header fixed-top">
        <nav class="navbar navbar-expand-lg navbar-light roiton-menu">
            <div class=container>

                <!-- LOGO NAME -->
                <a href="{% url 'index' %}" class="navbar-brand">Home </a>


                <!-- Responsive Menu Button -->
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-bar-icon"><i class="lni-menu"></i></span>
                </button>

                <!-- Navigation Menu -->
                <div id="navbarSupportedContent" class="collapse navbar-collapse">

                    <ul class="navbar-nav ml-auto">
                        <!-- Dropdown Link -->
                        <!-- Dropdown Link -->

                        <!-- Dropdown Link -->

                        <!-- Dropdown Link -->
                        <li class="nav-item nl-simple"><a class=nav-link href="{% url 'index' %}" target="blank">现状分析及潮汐点识别</a></li>
                        <li class="nav-item nl-simple"><a class=nav-link href="{% url 'xgboost' %}" target="blank">软件简介</a></li>

                        <!-- Button -->



                    </ul>

                </div>  <!-- End Navigation Menu -->

            </div>  <!-- End container -->

        </nav>  <!-- End navbar -->
    </header>
    <section id="page-hero" class="hero py-6">

        <div class="hero-center">

            <!-- breadcrumb Start -->
            <div class="container">
                <div class="row hero-content text-center">

                    <div class="col-lg-9 mx-auto">
                        <h2>调度方案</h2>
                        <nav aria-label="breadcrumb" class="d-flex flex-column align-items-center text-center">
                            <ol class="breadcrumb mb-0 bg-transparent p-0">
                                <li class="breadcrumb-item"><a class="text-white" href="{% url 'index' %}">Home</a></li>
                                <li class="breadcrumb-item active" aria-current="page">The scheduling scheme</li>
                            </ol>
                        </nav>
                    </div>
                </div>
            </div>  <!-- breadcrumb End -->

        </div>  <!-- END HERO-CENTER -->
    </section>   <!-- END HERO -->



    <!-- PORTFOLIO
   ============================================= -->
    <section id="about" class="about video py-6">
        <div class="container">

            <div class="about-bg-graphics">
                <img src="/static/assets/img/about-bg.png" alt="/">
            </div>


            <div class="row align-items-center">
                <div class="col-lg-6 mb-4 mb-lg-0">
                    <h2>
                        1.1算法简介
                    </h2>
                    <br>
                    <h3>
                        蚁群算法
                        </h3>
                    <p>
                        蚁群算法是一种用来寻找优化路径的概率型算法，这种算法具有分布计算、信息正反馈和启发式搜索的特征，本质上是进化算法中的一种启发式全局优化算法。将蚁群算法应用于解决优化问题的基本思路为：用蚂蚁的行走路径表示待优化问题的可行解，整个蚂蚁群体的所有路径构成待优化问题的解空间。路径较短的蚂蚁释放的信息素量较多，随着时间的推进，较短的路径上累积的信息素浓度逐渐增高，选择该路径的蚂蚁个数也愈来愈多。最终，整个蚂蚁会在正反馈的作用下集中到最佳的路径上，此时对应的便是待优化问题的最优解。
                    </p>
                    <p>
                        <a class="btn" href="https://baike.baidu.com/item/%E8%9A%81%E7%BE%A4%E7%AE%97%E6%B3%95" target="_blank">View details »</a>
                    </p>

                </div>

                <div class="col-lg-6 mb-4 mb-lg-0">
                    <h4 style="text-align: center">
                        蚁群算法示意图
                    </h4>
                    <br>
                    <img src="/static/images/ant.jpg">

                </div>

            </div>  <!-- End row -->
            <div class="row align-items-center">
                <div class="col-lg-6 mb-4 mb-lg-0">
                    <h3>
                        遗传算法
                    </h3>
                    <p>
                        遗传算法是一种基于自然选择和群体遗传机理的搜索算法，它模拟了自然选择和自然遗传过程中的繁殖、杂交和突变现象。在利用遗传算法求解问题时，问题的每一个可能解都被编码成一个“染色体”，即个体，若干个个体构成了群体(所有可能解)。在遗传算法开始时，总是随机的产生一些个体（即初始解），根据预定的目标函数对每一个个体进行评估，给出一个适应度值。基于此适应度值，选择一些个体用来产生下一代。选择操作体现了“适者生存”的原理，“好”的个体被用来产生下一代，而“坏”的个体则被淘汰。然后选择出来的个体经过交叉和变异算子进行再组合生成新的一代，这一代的个体由于继承了上一代的一些优良性状，因而在性能上要优于上一代，这样逐步朝着最优解的方向进化。因此，遗传算法可以看成是一个由可行解组成的群体初步进化的过程。
                    </p>
                    <p>
                        <a class="btn" href="https://baike.baidu.com/item/%E9%81%97%E4%BC%A0%E7%AE%97%E6%B3%95" target="_blank">View details »</a>
                    </p>

                </div>

                <div class="col-lg-6 mb-4 mb-lg-0">
                    <br>
                    <h4 style="text-align: center">
                        遗传算法示意图
                    </h4>
                    <br>
                    <img src="/static/images/遗传算法.jpg" width="550px" height="480px">
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <h3>
                        遗传混合蚁群算法
                    </h3>
                    <p>
                        为了做出调度路线的科学规划，我们利用遗传算法和蚁群算法各自在求解中的优势，融合两种算法设计共享单车的调度方案。</p>
                    <p>我们采用蚁群算法作为计算核来求解最短路径长度，该算法在运行初期容易受到信息素匮乏这一要素影响，使得寻优时间延长；在运行过程中容易过早收敛，陷入局部最优。同时我们根据遗传算法的特点：有较强的鲁棒性，具有快速的全局搜索能力，常用于多目标优化问题，以及在编码方式上选择了浮点数编码，也称实数编码，这种方式在解决连续参数优化的问题上普遍适用，具有较高的精度。因此我们利用遗传算法对蚁群算法的三个重要的浮点型参数：信息素重要程度因子α，启发函数重要程度因子β，信息素挥发因子ρ进行优化，得到适合当前数据集的相对最优参数组合，提升求解的速度和结果的质量。</p>
                       <p> 蚁群算法利用遗传算法所提供的最优参数组进行计算求解，设计最优路径线路，以及迭代过程结果。其流程图如下所示:

                    </p>
                    <div align="center" style="width:100%">
                    <img src="/static/images/混合遗传蚁群算法.png" /></div>
                </div>
            </div>

        </div>  <!-- End container -->
    </section>  <!-- END ABOUT -->



    <!-- TEAM
    ============================================= -->
    <section id="team" class="team py-6">
        <div class="container">

            <div class="pricing-section-left-bg-graphics">
                <img src="/static/assets/img/circle3.png" alt="/">
            </div>

            <!-- Title -->
            <div >
                <h2>1.2进行实验</h2>
            </div>
            <br>
            <h3>
                1.2.1数据处理
            </h3>
            <p>
                在经过基于XGBoost的共享单车供需资源预测处理后，可得到各个站点的经纬度坐标，以及其所拥有的deposit量。依据算法，我们需要对站点的经纬度坐标进行转化，得出平面坐标计算站点间的距离。所以在数据处理阶段，我们主要完成对所有的站点坐标的转换。</p>
                <p>我们所利用的工具为COORD.exe,其运行方式如下图所示。由此我们得到了所有站点的平面坐标。
            </p>
            <div align="center" style="width:100%">
                <img src="/static/images/坐标转换.png"></div>

            <div>
                <h3>
                    1.2.2做出假设
                </h3>
                <p>
                    与一般用蚁群算法来进行求解TSP问题不同，我们要解决多车辆调度，所以只用一只蚂蚁来经过所有的停车点是不现实的。因此，我们引入state即最大站点数（每辆调度车最多经过的站点数）来实现多车辆调度。并且在选择站点时对轮盘赌策略进行了改进，引入了punishment(惩罚因子)，其作用是当调度车在进行选择时不仅要考虑最短距离，还要考虑该站点的deposit情况。由此我们进行了如下的改进和规定:
                    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.默认8号点为调度起点;<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.停车点只能被一辆车调度;<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.调度车完成自己任务后要返回起点;<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.配送路线上各个停车点的配送量之和不能超过配送车辆的最大负载量;<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.deposit>0时代表该站点车辆过多，deposit<0时代表该站点车辆过少，并且当deposit=0时代表该站点正好满足人们需求;<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6.配送车所初始携带的量必须大于各个停车点的|deposit|;<br>
                </p>
            </div>
            <div>
                <h3>
                    1.2.3实验过程
                </h3>
                <p>
                    1.在实验过程中，我们首先随机初始化参数组带入蚁群算法计算路径，并将结果交付给遗传算法进行适应度评价。遗传算法朝着最优的方向进化出新的参数组，再将其带入蚁群算法中进行迭代。
                </p>
                <p>
                    2.在蚁群算法的具体操作中，我们通过设定禁忌表保证每个站点只遍历一遍，再设置最多站点数作为终止条件来进行多车辆调度。在调度方案设计中，我们通过每个站点的deposit值来确定调度车辆在该站点的具体动作，是卸载单车还是装载单车。
                </p>
                <p>
                    3.在实验中我们发现每只蚂蚁在其路径上留下的信息素与蚂蚁走过此次路径所携带的信息素浓度的相对残留度和信息素的增量有关。通过将新迭代的信息素以及初始信息素浓度都进行适当衰减后，能够在更加少的迭代次数时得到最优的调度路线。因此我们在初始信息素衰减的基础上，改变初始信息素浓度，以使得能够在较短时间内获得更短的调度距离。
                </p>
            </div>

        </div>  <!-- End container -->
    </section>  <!-- END TEAM -->

    <div class="container">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <h2>
                    1.3 调度结果
                </h2>
            </div>
        </div>
        <p>
            根据上述实验条件的步骤，我们进行了实验，并得出如下图所示的结果。
        </p>
        <div class="row clearfix">
            <div class="col-md-6 column">
                <img src="/static/images/迭代图.png" alt="/" class="rounded-top" width="550px" height="518px" title="迭代图">
                <p style="text-align: center">迭代图</p>
            </div>

            <div class="col-md-6 column">
                <img src="/static/images/路线距离图.png" alt="/" class="rounded-top" width="550px" height="518px" title="路线距离图">
                <p style="text-align: center">路线距离图</p>
            </div>
        </div>
        <div class="row clearfix" >
            <div class="col-md-8 column">
                <div style="text-align: center" >
                    <br>
                    <h3>
                        部分调度路线图
                    </h3>
                    <div id = "myEcharts"></div>

                </div>
            </div>
            <div class="col-md-4 column" >
                    <br>
                    <div class="btn-group-vertical" >
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            选择路线
                            <span class="caret"></span>
                        </button>
                        <div class="dropdown-menu dropdown-menu-right">
                            <button class="dropdown-item" type="button" onclick="set1()">路线1</button>
                            <button class="dropdown-item" type="button" onclick="set2()">路线2</button>
                            <button class="dropdown-item" type="button" onclick="set3()">路线3</button>
                            <button class="dropdown-item" type="button" onclick="set4()">路线4</button>
                            <button class="dropdown-item" type="button" onclick="set5()">路线5</button>
                            <button class="dropdown-item" type="button" onclick="set6()">路线6</button>
                            <button class="dropdown-item" type="button" onclick="set7()">路线7</button>
                            <button class="dropdown-item" type="button" onclick="set8()">路线8</button>
                            <button class="dropdown-item" type="button" onclick="set9()">路线9</button>
                            <button class="dropdown-item" type="button" onclick="set10()">路线10</button>
                            <button class="dropdown-item" type="button" onclick="set11()">路线11</button>
                            <button class="dropdown-item" type="button" onclick="set12()">路线12</button>
                            <button class="dropdown-item" type="button" onclick="set13()">路线13</button>
                            <button class="dropdown-item" type="button" onclick="set14()">路线14</button>
                        </div>
                    </div>

                <div class="alert alert-info" role="alert">
                    <p id="demo1">
                    </p>
                </div>
                <li class="header-btn">
                    <a href="{% url 'map_new' %}" class="btn " target="_blank">
                        <span>全部路线图</span>
                    </a>
                </li>

            </div>
        </div>
    </div>


    <div class="container">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <br>
                <h2>
                    1.4结果分析
                </h2>
                <p>
                    根据实验所得出的调度路线（上图），我们以一个调度车（3号车）为例，对它的行驶过程进行分析。该车的行驶路线为：8 ->67 ->95 ->30 ->28 ->29 ->98 ->97 ->188 ->142 ->141 ->3 ->2 ->0 ->1 ->8
                </p>
                <p>
                    根据该车在经过每一站时，该车所做的操作和操作完成之后的影响如下表所示:
                </p>
                <div align="center" style="width:100%">
                <img src="/static/images/调度车动作.png" height="550px" width="600px"></div>
                <p>
                    Distance=13020+dis[1][8]=13020+5636=18656
                </p>
                <p>
                    由该表可知，出发前携带了200辆，各站点deposit总和为63，调度完成后携带263辆共享单车，即调度完成之后单车数量正确。根据距离矩阵得到到各停车点走了多长距离，最终计算出总和为18656，与图X中3号车的总距离相同，即表明距离计算正确。由此可看出该车的行驶过程是正确且合理的。
                </p>
                <p>
                    根据总体调度路线来看，我们将所有的停车点都遍历了一遍，并且共享单车的总数量和行驶的总距离之和也是正确的。故而可以表明我们调度的最终结果是合理的，能够满足第二天的预测需求。
                </p>
                <p>
                    根据整个调度方案设计的过程来看，我们首先对XGboost预测得到的数据进行了数据处理，即将经纬度转化为平面坐标。之后通过遗传混合蚁群算法进行多轮次的迭代和遗传，得到比较合适的α，β，ρ参数组。然后我们通过实验和实际情况的分析得到出一个合理的state即最大站点数，将其带入蚁群算法中计算出最优的路线。并且根据该调度方案对一辆车的调度路线进行了系统的分析，发现其调度过程是合理的。最后我们将实验结果通过前端获取百度API引入地图进行了可视化的展示。最后我们还在前端界面设置了一个交互功能的接口，用户也可以通过传入数据来得到调度方案，该方案路线也会在前端以可视化形式展现出来。
                </p>
            </div>
        </div>
    </div>

    <!-- 交互（提交excel文件）
    ============================================= -->

    <section id="about" class="about video py-6">
        <div class="container">
            <div class="row clearfix">
                <div class="col-md-12 column" >
                    <h2 style="text-align: center">
                        1.5交互功能
                    </h2>
                    <div class="alert alert-success alert-dismissable">
                        <p>
                            通过上传如下图所示的excel,csv表格便可以生成调度路线(.txt文件)(其中 n代表站点号,x代表转换后的平面x坐标, y代表转换后的平面y坐标,d代表deposit量,latitude代表纬度,longitude代表经度)
                        </p>
                    </div>
                    <div align="center" style="width:100%">
                    <img src="/static/images/调度示例.png"  /></div>

                    <form  action="/uploadFile_aco/" method="post" enctype="multipart/form-data" style="text-align: center">
                        <input type="file" name="myfile" ><br>
                        {% csrf_token %}
                        <input type="submit" value="提交"/><br>
                    </form>
                <div style="text-align: center">
                    {% if flag %}
                        {{ flag }}<br>
                            {% ifequal flag  '上传成功！' %}
                                点击按钮下载结果文件：<br></div>
                            <form action="/downloadFile_aco/" method="post" style="text-align: center">{% csrf_token %}
                                <input type="text" name="filename"><br>
                                <input type="submit" value="下载"/>
                            </form>
                            {% endifequal %}
                    {% endif %}<br>

                </div>
            </div>
        </div>
    </section>

    <!-- Return to Top -->
    <a href="javascript:void(0)" class="return-to-top"><i class="lni-chevron-up"></i></a>




</div>
</body>
</html>

<script>
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1328923,24.53089684],
                [118.1358765,24.53875083],
                [118.134006,24.53638881],
                [118.0811032,24.50150175],
                [118.081052,24.50134353],
                [118.0939205,24.4894048],
                [118.0943045,24.48783733],
                [118.0915037,24.48775765],
                [118.0913619,24.48852763],
                [118.1094841,24.50723001],
                [118.1138251,24.49832126],
                [118.1164174,24.49950432],
                [118.1118393,24.47351509],
                [118.1170899,24.46898551],
                [118.147021,24.496151],
                [118.147021,24.496151],
                [118.1407648,24.47719645],
                [118.1425643,24.47819914],
                [118.1766888,24.46502084],
                [118.1854575,24.48135488],
                [118.167369,24.4714235],
                [118.1684105,24.4735375],
                [118.1573665,24.474209],
                [118.171628,24.460277],
                [118.1753316,24.4666151],
                [118.1831801,24.47136062],
                [118.1678844,24.48389926],
                [118.164607,24.4798743],
                [118.1706035,24.49730511],
                [118.1677622,24.49580264],
                [118.147021,24.496151],
                [118.147021,24.496151],
                [118.1574702,24.53842334],
                [118.1593967,24.54070718],
                [118.1616685,24.50464714],
                [118.1610954,24.51186957],
                [118.1661756,24.52390339],
                [118.1667309,24.52737575],
                [118.1607955,24.54401075],
                [118.1541175,24.545071],
                [118.1060396,24.53649883],
                [118.1364453,24.52080887],
                [118.128983,24.50193425],
                [118.1412428,24.5109425],
                [118.1543835,24.50385463],
                [118.1545542,24.50516339],
                [118.147021,24.496151]

            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 13,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.8,
                        width: 2
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);
</script>
<script>
    function set1(){
        var x="1路线为8->33->32->147->114->190->157->158->179->178->130->57->56->156->58->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                    [118.147021,24.496151],
                    [118.1495145,24.49534657],
                    [118.1490391,24.49143104],
                    [118.1324828,24.515459],
                    [118.1372002,24.53243914],
                    [118.1182273,24.54326274],
                    [118.1137189,24.54912961],
                    [118.1141002,24.54874466],
                    [118.1202087,24.53257275],
                    [118.1184397,24.53130806],
                    [118.112368,24.53871872],
                    [118.1819802,24.52700474],
                    [118.1817661,24.52572506],
                    [118.1789506,24.53179176],
                    [118.1801247,24.53387018],
                    [118.147021,24.496151]
            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.8,
                        width: 2
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set2(){
        var x="2路线为8->115->116->175->136->20->182->90->143->146->164->12->133- 145->191 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1357754,24.49881039],
                [118.136062,24.497574],
                [118.0843726,24.45148256],
                [118.0840308,24.47229127],
                [118.074334,24.48627408],
                [118.0698055,24.47315444],
                [118.0809952,24.458691],
                [118.0791288,24.44843901],
                [118.0817225,24.44697575],
                [118.080416,24.44411279],
                [118.0869134,24.43978555],
                [118.0856975,24.438891],
                [118.0787012,24.45346768],
                [118.068686,24.45717607],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.8,
                        width: 2
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set3(){
        var x="3路线为8->67->95->30->28->29->98->97->188->142->141->3 -2 ->0 ->1 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1392605,24.50176948],
                [118.1173089,24.51170734],
                [118.1246245,24.5090415],
                [118.1241579,24.50497121],
                [118.1250824,24.50509462],
                [118.1201129,24.52345374],
                [118.1201976,24.51886738],
                [118.0916167,24.52284616],
                [118.096412,24.53421639],
                [118.1030405,24.526857],
                [118.1029333,24.5269695],
                [118.1032168,24.527352],
                [118.10297,24.5270205],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.8,
                        width: 2
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set4(){
        var x="4路线为8->125->126- 177->43->42- 132->41->40->151->138 ->137 ->128 ->127 ->166 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1252675,24.4938935],
                [118.1242847,24.49293839],
                [118.1427014,24.50643465],
                [118.1459754,24.53808541],
                [118.1468344,24.53591245],
                [118.1587807,24.53492218],
                [118.148138,24.53281305],
                [118.1318067,24.5181967],
                [118.1360545,24.52372975],
                [118.13541,24.5235165],
                [118.1231072,24.55471569],
                [118.1228532,24.5512632],
                [118.1306958,24.55775917],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set5(){
        var x="5路线为8->79->78->81->63->185->53->64->99->80->155->76->75->103->124->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1623063,24.455054],
                [118.165529,24.4566265],
                [118.1834764,24.48870679],
                [118.1627479,24.50523671],
                [118.1719362,24.50138614],
                [118.1698623,24.51375214],
                [118.1720708,24.50963894],
                [118.1734974,24.48115992],
                [118.1828418,24.48504181],
                [118.179531,24.49144733],
                [118.1812512,24.47244992],
                [118.1778228,24.47371703],
                [118.1638825,24.46315275],
                [118.1380001,24.49306787],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set6(){
        var x="6路线为8-82->83->62->49->51->52->84-140 ->27 ->159 ->66 ->152 ->35 ->36 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1574702,24.53842334],
                [118.1593967,24.54070718],
                [118.1616685,24.50464714],
                [118.1610954,24.51186957],
                [118.1661756,24.52390339],
                [118.1667309,24.52737575],
                [118.1607955,24.54401075],
                [118.1541175,24.545071],
                [118.1060396,24.53649883],
                [118.1364453,24.52080887],
                [118.128983,24.50193425],
                [118.1412428,24.5109425],
                [118.1543835,24.50385463],
                [118.1545542,24.50516339],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set7(){
        var x="7路线为8->50->37->38-18-153-61-169-154->60->192 ->44-176->150 ->14->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1580168,24.51875593],
                [118.1537308,24.51505907],
                [118.1534845,24.51612244],
                [118.1276436,24.47659781],
                [118.1138034,24.43420653],
                [118.1153204,24.43222957],
                [118.1023332,24.43330653],
                [118.1146091,24.43365726],
                [118.1138674,24.43353433],
                [118.118453,24.44256444],
                [118.1466089,24.44557099],
                [118.1383897,24.48314198],
                [118.1104357,24.46053978],
                [118.1149325,24.47436922],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script><script>
    function set8(){
        var x="8路线为8->183->47->73->123->101->100->149->77->72->74->104->102->186 ->187 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1407648,24.47719645],
                [118.1425643,24.47819914],
                [118.1766888,24.46502084],
                [118.1854575,24.48135488],
                [118.167369,24.4714235],
                [118.1684105,24.4735375],
                [118.1573665,24.474209],
                [118.171628,24.460277],
                [118.1753316,24.4666151],
                [118.1831801,24.47136062],
                [118.1678844,24.48389926],
                [118.164607,24.4798743],
                [118.1706035,24.49730511],
                [118.1677622,24.49580264],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set9(){
        var x="9路线为8->162->165->168->131->91->4->106->25->107->92->94->19->17 ->120 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1009371,24.54380033],
                [118.1035729,24.54571668],
                [118.1353927,24.4316807],
                [118.140142,24.4382655],
                [118.0919515,24.52003675],
                [118.148138,24.53281305],
                [118.1521418,24.52153663],
                [118.1318067,24.5181967],
                [118.1360545,24.52372975],
                [118.13541,24.5235165],
                [118.1231072,24.55471569],
                [118.1228532,24.5512632],
                [118.1306958,24.55775917],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set10(){
        var x="10路线为8->117->119->118->173->172->11->181->112->108->88->89-135->167 ->139 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1909866,24.49044611],
                [118.1911107,24.48656555],
                [118.1911188,24.496771],
                [118.185117,24.50636516],
                [118.1828815,24.51188663],
                [118.1840119,24.50045849],
                [118.0689915,24.46783765],
                [118.0695552,24.46315036],
                [118.0703931,24.46297931],
                [118.0848316,24.45926759],
                [118.0872663,24.46308624],
                [118.1216551,24.42720888],
                [118.1258609,24.42702037],
                [118.0817294,24.47907691],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set11(){
        var x="11路线为8->180->111->121-110-10->148->21->65 ->22- 105 ->161 ->163 ->109 ->24 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1256949,24.48850547],
                [118.1034013,24.46996473],
                [118.1041035,24.46645866],
                [118.0931585,24.46738901],
                [118.0963594,24.46302473],
                [118.0792495,24.46695368],
                [118.0758698,24.49067261],
                [118.08147,24.49517687],
                [118.0802012,24.49925575],
                [118.1056083,24.51750935],
                [118.096412,24.53421639],
                [118.0947383,24.53838594],
                [118.0899107,24.4665729],
                [118.0732178,24.48123543],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script><script>
    function set12(){
        var x="12路线为8->34->31->46->134->122->39->174->59->55->54->45 -170 -171 -184 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.147357,24.48213625],
                [118.1475268,24.48577114],
                [118.1483385,24.45532523],
                [118.095235,24.4354705],
                [118.1007313,24.47579064],
                [118.1491523,24.53038825],
                [118.1458435,24.54840515],
                [118.1798822,24.53333288],
                [118.1796622,24.52236616],
                [118.1758955,24.51804119],
                [118.1480862,24.44152685],
                [118.1572235,24.446647],
                [118.1591143,24.4477945],
                [118.1659178,24.4909095],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script><script>
    function set13(){
        var x="13路线为8->113->189->160->23->26->7->9->6->5->71->69->68->96->13->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1328923,24.53089684],
                [118.1358765,24.53875083],
                [118.134006,24.53638881],
                [118.0811032,24.50150175],
                [118.081052,24.50134353],
                [118.0939205,24.4894048],
                [118.0943045,24.48783733],
                [118.0915037,24.48775765],
                [118.0913619,24.48852763],
                [118.1094841,24.50723001],
                [118.1138251,24.49832126],
                [118.1164174,24.49950432],
                [118.1118393,24.47351509],
                [118.1170899,24.46898551],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
<script>
    function set14(){
        var x="14路线为8->48->87->16->70->15->129->86 ->85 ->93 -144 ->8"
        document.getElementById("demo1").innerHTML=x;
        var myChart33 = echarts.init(document.getElementById('myEcharts'));
        var option;
        lines=[{"coords":[
                [118.147021,24.496151],
                [118.1850155,24.4967146],
                [118.1721585,24.4848605],
                [118.1050395,24.48292227],
                [118.1025855,24.49451978],
                [118.1062861,24.48453628],
                [118.116965,24.48570845],
                [118.1070089,24.49972128],
                [118.1080695,24.49191208],
                [118.0925918,24.51134986],
                [118.0789881,24.47743628],
                [118.147021,24.496151]


            ]}]
        myChart33.setOption(option = {
            bmap: {
                center: [118.147021,24.496151],
                zoom: 14,
                roam: true,
            },
            series: [{
                type: 'lines',
                coordinateSystem: 'bmap',
                data: lines,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: 'purple',
                        opacity: 0.6,
                        width: 3
                    }
                }
            }]
        });
        option&&myChart33.setOption(option);}
</script>
